Form1 ListDrag Demo Form1- Label1 List1 Courier Label2 Hold down Ctrl key and use Up and Down arrow keys to move a line in the listbox. Or press Ctrl and drag a line with the mouse. StartY MoveLine_ Item1 TRUEy FALSE Form_Load List1 ListIndex ListSwap Line1 Line2I ListBox Tempx List1_MouseDown& Button Shift7 CtrlDown RowSize List1_MouseMovep Label1B Caption ButtonDown ListCount List1_MouseUp. List1_KeyUp KeyCode List1_KeyDown UpPressed KEY_UP DownPressed KEY_DOWN\ Height Item2 List1_Click List1_DblClick MoveNow Label1_Click Label1_DragDrop Source8 Label1_DragOver State Label1_MouseDown~ Label1_MouseMove Label1_Top Label1_Left Label1_Width` Label1_HeightV Width List1_DragDrop Label List1_DragOver Enabled Label2 FontSize Offset Form_MouseUp WriteArray TempArray First IntSwap Array SwapInt TempInt MoveRow Thenase StaCase screen activecontrol LISTSWAP.MAK a demonstration Visual Basic program to show how single items in a list box can be reordered using Ctrl-UpArrow/DownArrow or by pressing Ctrl and dragging a list item with the mouse. Sue Mosher, 202-736-1136, CIS 75140,543 r Public domain values: -1 for UP move, 1 for DOWN, 0 for none line to be moved Form_Load Item " ListSwap List1_MouseDown get item to be moved move label control to mouse position and starts dragging it List1_KeyUp List1_KeyDown set item to be moved List1_DragDrop List1_DragOver if leaving list, turn off drag & force drop if within move range) SwapInt MoveRow if within 1 row